@extends('layouts.app')

@section('content')


 <script src="{{ URL::asset('/') }}js/jedate/jedate.js"></script>

    <div class="content">
        <div class="header">
            <ul class="breadcrumb">
                <li>行政案件</li>
                <li><a href="javascript:;">申请延期</a> </li>
            </ul>
        </div>
        <div class="main-content">
            <ul class="nav nav-tabs">
                <li class="active"><a href="#home" data-toggle="tab">{{$case->case_name}} - 申请延期</a></li>
            </ul>

            <div class="row">
                <div class="col-md-6">
                    <br>
                    <div id="myTabContent" class="tab-content">
                        <div class="tab-pane active in" id="home">
                            <form id="tab" class="form-horizontal" method="post">
                                <input type="hidden" name="_token" value="{{ csrf_token() }}">

                                <div class="form-group">
                                    <label for="input1" class="col-sm-2 control-label" style="color:green">原开始时间</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" value="{{$headline->start}}" readonly>
                                    </div>
                                </div>


                                <div class="form-group">
                                    <label for="input1" class="col-sm-2 control-label" style="color:green">原预计结束时间</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control"  value="{{$headline->end}}" readonly>
                                    </div>
                                </div>


                                @if($case->is_delay == 1)
                                <div class="form-group">
                                    <label for="input1" class="col-sm-2 control-label">延期开始时间</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" value="{{$hdl->yan_start}}" readonly>
                                    </div>

                                </div>


                                <div class="form-group">
                                    <label for="input1" class="col-sm-2 control-label">预计延期结束时间</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control"  value="{{$hdl->yan_end}}" readonly>
                                    </div>
                                </div>

                                @if ( ($case->is_delay === 1 && $case->is_delayok === 1)||($case->is_delay === 1 && $case->is_delayok === 3) )

                                 <div class="form-group">
                                    <label for="input1" class="col-sm-2 control-label">通知书</label>
                                    <div class="col-sm-10">
                                        <a href="{{ URL::asset('/') }}storage/uploads/{{$hdl->yan_pic}}" target="_blank">
                                           <img src="{{ URL::asset('/') }}storage/uploads/{{$hdl->yan_pic}}">
                                         </a>
                                    </div>
                                </div>

                                @endif


                                @else

                                <div class="form-group">
                                    <label for="input1" class="col-sm-2 control-label">延期开始时间</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" name="start" id="start" placeholder="延期开始时间" value="" readonly>
                                    </div>
                                </div>


                                 <div class="form-group">
                                    <label for="input1" class="col-sm-2 control-label">预计延期结束时间</label>
                                    <div class="col-sm-10">
                                       <input type="text" class="form-control" name="end" id="end" placeholder="预计延期结束时间" value="" readonly>
                                    </div>
                                </div>


                               

                                @endif


                              






                                @if ($case->is_deadline	 === 1 && $case->is_deadlineok === 3 && $case->is_delay === 0)
                                <div class="btn-toolbar list-toolbar btn-toolbar2">
                                    <input type="submit" value="提交申请" class="btn btn-primary"  id="ok">
                                </div>
                                @elseif ($case->is_delay === 1 && $case->is_delayok === 0)

                                    


                        

                                <div class="btn-toolbar list-toolbar btn-toolbar2">


                                <a href="{{url('admin/case/delaydtone',$case->case_id)}}">
                                  <input type="button" value="审核通过" class="btn btn-primary"  style="width: 100px;">
                                </a>

                                <a href="{{url('admin/case/delaydj',$case->case_id)}}">
                                  <input type="button" value="审核不通过" class="btn btn-primary"  style="width: 120px;">
                                </a>
                                </div>

                                @elseif ($case->is_delay === 1 && $case->is_delayok === 1)




                                <div class="btn-toolbar list-toolbar btn-toolbar2">
                                <a href="{{url('admin/case/delaylddt',$case->case_id)}}">
                                  <input type="button" value="领导审批通过" class="btn btn-primary"  style="width: 120px;">
                                </a>

                                <a href="{{url('admin/case/delaylddj',$case->case_id)}}">
                                  <input type="button" value="领导审批不通过" class="btn btn-primary"  style="width: 140px;">
                                </a>
                                </div>


                                @endif

                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>





    <script>
        /*时间*/
        jeDate({
            dateCell: "#start",
            format: "YYYY年MM月DD日",
            isinitVal: true,
            isTime: true, //isClear:false,
            minDate: "2014-09-19 00:00:00",
            okfun: function (val) {
            }
        })

        jeDate({
            dateCell: "#end",
            format: "YYYY年MM月DD日",
            isinitVal: true,
            isTime: true, //isClear:false,
            minDate: "2014-09-19 00:00:00",
            okfun: function (val) {
            }
        })
    </script>

    <script>
      $('#ok').click(function(){
          var i=window.confirm("确认提交,提交后将不可修改!");
          if(i==0){
              return false;
          }
      });
    </script>







@stop
